/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * 
 * $Rev:: 15            $:  Revision of last commit
 * $Author:: rvhaverm@g#$:  Author of last commit
 * $Date:: 2010-07-25 1#$:  Date of last commit
 * 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package agents.agents;

import com.ibm.aglet.*;

//import agents.msgs.*;
import agents.aglets.AgletBridge;


/**
 * General agent in the Travel Agent System that forms the base for the social
 * structure.
 * 
 * This type of agent is the base for all agents that need information from one
 * another. So this can be a mobile service or a stationary service, like a
 * DBAgent or a Receptionist. We refer to the Software Design Document for an
 * intensive study of the agents' hierarchy.
 * 
 * @author Ruben Van Havermaet
 * @version 0.2
 */
public abstract class QueryAgent extends BaseAgent
{

//    /**
//     * An AgletProxy representing the agent responsible for the User Interface.
//     * 
//     * Every QueryAgent needs a link to the agent responsible for the User
//     * Interface so that it can sends messages to this uiAgent_ if it wishes to
//     * display information for the user.
//     */
//    protected AgletProxy _uiAgent = null;

    /**
     * What to do on creation.
     */
    public void onCreation(Object init)
    {
	super.onCreation(init);
    }

//    /**
//     * A way for the agent's methods to send text to the ui's log.
//     * 
//     * This method can be used by the agent's methods to display text. It
//     * creates a message and calls the display(Message) method. If, for
//     * instance, the AgletContext wants this agent to display something on the
//     * User Interface, then it <b>has</b> to call the display(Message msg)
//     * method. But to make life easier for the agent itself, we didn't want to
//     * require it to create a Message everytime it want to log something.
//     * Therefore this method exists.
//     * 
//     * @param text
//     *            a String representing the message this agent want to record on
//     *            the ui.
//     */
//    protected void displayText(String text)
//    {
//	PrintMessage m = MessageFactory.newPrintMessage(text);
//	display(m);
//    }
//
//    // *** PUBLIC MESSAGE METHODS *********************************************
//    /**
//     * A way for remote agents to tell this agent to display something on the
//     * screen.
//     * 
//     * This method will be invoked when a PrintMessage is sent to the agent. It
//     * delegates the Message further to the agent that is responsible for the
//     * user interface.
//     * 
//     * @param msg
//     *            a PrintMessage
//     * @return a boolean indicating whether the message was sent without
//     *         problems
//     * @see agents.msgs.PrintMessage
//     */
//    public void display(Message msg)
//    {
//	// forward the Message to the UI-agent
//	AgletBridge.sendMessage(_uiAgent, msg);
//    }
}
